<?php
class Friend_point extends CI_Model {

    var $friend_id = '';
    var $point = '';
    var $position = '';
    var $datetime = '';
    var $cate_type_id = '';
    var $user_id = '';
    
    function __construct()
    {
        // Call the Model constructor
        parent::__construct();
    }
    function setAttribute($friend_id, $point, $datetime, $cate_type_id, $user_id,$position) {
        $this->friend_id = $friend_id; // please read the below note
        $this->point = $point;
        $this->position = $position;
        $this->datetime = $datetime;
        $this->cate_type_id = $cate_type_id;
        $this->user_id = $user_id;
    }
    function insert_friend_point($friend_id, $point, $datetime, $cate_type_id, $user_id,$position) {
        $this->setAttribute($friend_id, $point, $datetime, $cate_type_id, $user_id);
        $this->db->insert('friend_point', $this);
    }

}